(* Mathematica Package *)

(* Created by the Wolfram Workbench Jan 28, 2014 *)

BeginPackage["ThinFilmNLS`",{"InterfacialThinFilmNLS`","KramersKronigOscillators`"}]

GenerateTicks::usage = "Function to generate FrameTicks for 1 and 2D plots (e.g. Plot, ContourPlot, ect)"

Begin["`Private`"]

(*Keep ThinFilmNLSupdater` off $ContextPath*)
<< ThinFilmNLSupdater`
CheckUpdate[DirectoryName @ $InputFileName]

Clear[GenerateTicks]
Options[GenerateTicks] = {PrimaryLength -> {0.00625`, 0.`}, 
   SecondaryLength -> {0.00375`, 0.`}, 
   PrimaryStyle -> {GrayLevel[0.`], AbsoluteThickness[1.5`]}, 
   SecondaryStyle -> {GrayLevel[0.`], AbsoluteThickness[0.5`]}, 
   PrimaryLabel -> True, TickLabelF -> (# &)};

GenerateTicks[Start_, End_, numPrimary_, numSecondary_, 
  OptionsPattern[]] := 
 Module[{\[CapitalDelta]Primary, \[CapitalDelta]Secondary, LabelF},
  LabelF = OptionValue[TickLabelF];
  \[CapitalDelta]Primary = (End - Start)/(numPrimary - 1);
  \[CapitalDelta]Secondary = \[CapitalDelta]Primary/(
   numSecondary + 1); 
  Table[Sequence @@ 
    Join[{{x, Evaluate@If[OptionValue[PrimaryLabel], LabelF[x], ""], 
       OptionValue[PrimaryLength], OptionValue[PrimaryStyle]}}, 
     If[x == End, {}, 
      Table[{y, "", OptionValue[SecondaryLength], 
        OptionValue[SecondaryStyle]}, {y, 
        x + \[CapitalDelta]Secondary, 
        x + \[CapitalDelta]Primary - \[CapitalDelta]Secondary, \
\[CapitalDelta]Secondary}]]], {x, Start, 
    End, \[CapitalDelta]Primary}]]



(*ThinFilmNLSModel[]:= to be written*)

End[]

EndPackage[]

